package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.ProjectModelInfoMapper;
import com.ruoyi.project.domain.ProjectModelInfo;
import com.ruoyi.project.service.IProjectModelInfoService;

/**
 * 项目建模Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-26
 */
@Service
public class ProjectModelInfoServiceImpl implements IProjectModelInfoService 
{
    @Autowired
    private ProjectModelInfoMapper projectModelInfoMapper;

    /**
     * 查询项目建模
     * 
     * @param id 项目建模主键
     * @return 项目建模
     */
    @Override
    public ProjectModelInfo selectProjectModelInfoById(Long id)
    {
        return projectModelInfoMapper.selectProjectModelInfoById(id);
    }

    /**
     * 查询项目建模列表
     * 
     * @param projectModelInfo 项目建模
     * @return 项目建模
     */
    @Override
    public List<ProjectModelInfo> selectProjectModelInfoList(ProjectModelInfo projectModelInfo)
    {
        return projectModelInfoMapper.selectProjectModelInfoList(projectModelInfo);
    }

    /**
     * 新增项目建模
     * 
     * @param projectModelInfo 项目建模
     * @return 结果
     */
    @Override
    public int insertProjectModelInfo(ProjectModelInfo projectModelInfo)
    {
        projectModelInfo.setCreateTime(DateUtils.getNowDate());
        return projectModelInfoMapper.insertProjectModelInfo(projectModelInfo);
    }

    /**
     * 修改项目建模
     * 
     * @param projectModelInfo 项目建模
     * @return 结果
     */
    @Override
    public int updateProjectModelInfo(ProjectModelInfo projectModelInfo)
    {
        projectModelInfo.setUpdateTime(DateUtils.getNowDate());
        return projectModelInfoMapper.updateProjectModelInfo(projectModelInfo);
    }

    /**
     * 批量删除项目建模
     * 
     * @param ids 需要删除的项目建模主键
     * @return 结果
     */
    @Override
    public int deleteProjectModelInfoByIds(Long[] ids)
    {
        return projectModelInfoMapper.deleteProjectModelInfoByIds(ids);
    }

    /**
     * 删除项目建模信息
     * 
     * @param id 项目建模主键
     * @return 结果
     */
    @Override
    public int deleteProjectModelInfoById(Long id)
    {
        return projectModelInfoMapper.deleteProjectModelInfoById(id);
    }
}
